package cn.stylefeng.guns.modular.transport.mapper;

import cn.stylefeng.guns.modular.transport.entity.Hxchengyunshanganalysis;
import cn.stylefeng.guns.modular.transport.entity.TDispatch;
import cn.stylefeng.guns.modular.transport.model.params.TDispatchParam;
import cn.stylefeng.guns.modular.transport.model.result.SjCntVo;
import cn.stylefeng.guns.modular.transport.model.result.TDispatchResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 调度单表 Mapper 接口
 */
public interface TDispatchMapper extends BaseMapper<TDispatch> {

    /**
     * 获取列表
     */
    List<TDispatchResult> customList(@Param("paramCondition") TDispatchParam paramCondition);

    /**
     * 获取map列表
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") TDispatchParam paramCondition);

    /**
     * 获取分页实体列表
     */
    Page<TDispatchResult> customPageList(@Param("page") Page page, @Param("paramCondition") TDispatchParam paramCondition
    		, @Param("condition") String condition, @Param("driver1")String driver1, @Param("operateId")Long operateId);


	List<SjCntVo> getSJCnt();

    /**
     * 获取分页实体列表
     */
    Page<TDispatchResult> findPageBySpecPaymentSettlement(@Param("page") Page page, @Param("paramCondition") TDispatchParam paramCondition
    		, @Param("condition") String condition, @Param("driver1")String driver1, @Param("operateId")Long operateId);
    /**
     * 获取分页实体列表
     */
    Page<TDispatchResult> findPageBySpecPaymentConfirm(@Param("page") Page page, @Param("paramCondition") TDispatchParam paramCondition
    		, @Param("condition") String condition, @Param("driver1")String driver1, @Param("operateId")Long operateId);

    Page<TDispatchResult> findexaminePageBySpec(@Param("page")Page page, @Param("paramCondition")TDispatchParam param
    		, @Param("condition")String condition, @Param("driver1")String driver1, @Param("operateId")Long operateId);

    /**
     * 获取分页map列表
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") TDispatchParam paramCondition);

	List<TDispatchResult> findListBySpec(@Param("paramCondition")TDispatchParam param);

	TDispatch findByThelastone();

	TDispatchResult findBySpec(@Param("paramCondition")TDispatchParam param,@Param("operateId")Long operateId);

	TDispatchResult findByDispatchNumber(@Param("dispatchNumber")String dispatchNumber);

	Integer sumDayFaYunCarCount(@Param("paramCondition")TDispatchParam tDispatchParam);

	Integer sumMonthFaYunCarCount(@Param("paramCondition")TDispatchParam tDispatchParam);

	List<TDispatchResult> findchengyunshangcount(@Param("paramCondition")TDispatchParam param
			, @Param("condition")String condition, @Param("driver1")String driver1, @Param("operateId")Long operateId);

	Integer countCarnumber(@Param("paramCondition")TDispatchParam param,@Param("operateId")Long operateId);

	TDispatchResult findBySpecAndCar(@Param("paramCondition")TDispatchParam param);

	TDispatchResult findByYunshuCar(@Param("paramCondition")TDispatchParam param, @Param("operateId")Long operateId);

	TDispatchResult findsumMonthFaYunCarCount(@Param("paramCondition")TDispatchParam tDispatchParam,@Param("operateId")Long operateId);

	TDispatchResult sumfulllvBySpec(@Param("paramCondition")TDispatchParam tDispatchParam);

	List<TDispatchResult> findHxtaizhang(@Param("paramCondition")TDispatchParam tDispatchParam, @Param("condition")String condition, @Param("operateId")Long operateId);

	List<TDispatchResult> findHxzhaungzaicount(@Param("paramCondition")TDispatchParam tDispatchParam, @Param("condition")String condition, @Param("operateId")Long operateId);

	List<Hxchengyunshanganalysis> findHxchengyunshanganalysis(@Param("paramCondition")TDispatchParam tDispatchParam, @Param("condition")String condition, @Param("operateId")Long operateId);

	Integer countcheci(@Param("paramCondition")TDispatchParam countcheci);

	List<TDispatchResult> findHxfayuncheci(@Param("paramCondition")TDispatchParam tDispatchParam, @Param("condition")String condition, @Param("operateId")Long operateId);

	List<TDispatchResult> findshifouyipeizhiByspec(@Param("paramCondition")TDispatchParam tDispatchParam, @Param("operateId")Long operateId);

	List<TDispatchResult> findHxzhuangchejindu(@Param("paramCondition")TDispatchParam tDispatchParam, @Param("condition")String condition, @Param("operateId")Long operateId);


	void update2(@Param("paramCondition")TDispatchParam tDispatchParam);

	int update5(@Param("paramCondition")TDispatchParam tDispatchParam);

	List<TDispatchResult> selectByRoutr();

	List<TDispatchResult> findByIds(@Param("idList") List<String> idList);

}
